Skip to content

Conversation

@Michiel87
Copy link
Contributor

There might be a problem with the timing of unsubscription and the execution of the debounced function. If the unsubscribe function is called at a moment when the debounced function has already been scheduled to be executed but hasn't yet executed, it won't stop the function from executing.

This is due to the fact that the execute function is only canceled by cancelTick which is removing it from ticks, but it doesn't actually stop it if it's already been scheduled.

I've added a condition to account for this.

@Michiel87 Michiel87 changed the title fix: check whether tick has been removed before execution of function fix: check whether tick has been removed before execution of liveQuery subscription Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant